package com.liuwei.msmall.order.feign;

import com.liuwei.msmall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Classname ProductFeignService
 * @Description TODO
 * @Date 2020/7/15 2:41
 * @Created by 刘
 */
@FeignClient("msmall-product-service")
public interface ProductFeignService {
    /**
     * 通过skuId查出spu信息
     * @param skuId
     * @return
     */
    @GetMapping("/product/spuinfo/skuId/{id}")
    R getSpuInfoBySkuId(@PathVariable("id") Long skuId);

    /**
     * 通过skuId查询带销售属性的skuInfo
     */
    @GetMapping("/product/skuinfo/getSkuInfoWithSaleAttr/{skuId}")
    R getSkuInfoWithSaleAttr(@PathVariable("skuId") Long skuId);
}
